﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="ClientsUpdate.aspx.cs" Inherits="ClientsUpdate" Title="Project Monitoring System"
    Culture="auto:en-US" UICulture="auto" meta:resourcekey="PageResource1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="Server">
    <asp:ObjectDataSource ID="ODSClient" runat="server" SelectMethod="GetClientData"
        TypeName="IPTableAdapters.ClientTableAdapter" OldValuesParameterFormatString="original_{0}"
        DeleteMethod="Delete" InsertMethod="Insert" UpdateMethod="Update">
        <SelectParameters>
            <asp:SessionParameter DefaultValue="0" Name="SuperUser" SessionField="SuperUser"
                Type="String" />
            <asp:SessionParameter DefaultValue="" Name="OwnerGroupID" SessionField="OwnerGroupID"
                Type="String" />
        </SelectParameters>
        <DeleteParameters>
            <asp:Parameter Name="IsDelete" Type="Boolean" />
            <asp:Parameter Name="DeleteBy" Type="String" />
            <asp:Parameter Name="DeleteIP" Type="String" />
            <asp:Parameter Name="Original_Client" Type="String" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="ChineseName" Type="String" />
            <asp:Parameter Name="Address" Type="String" />
            <asp:Parameter Name="ContactPerson" Type="String" />
            <asp:Parameter Name="JobTitle" Type="String" />
            <asp:Parameter Name="Phone" Type="String" />
            <asp:Parameter Name="Fax" Type="String" />
            <asp:Parameter Name="Phone2" Type="String" />
            <asp:Parameter Name="MobilePhone" Type="String" />
            <asp:Parameter Name="MobilePhone2" Type="String" />
            <asp:Parameter Name="WebSite" Type="String" />
            <asp:Parameter Name="EmailAddress" Type="String" />
            <asp:Parameter Name="EmailAddress2" Type="String" />
            <asp:Parameter Name="UpdateBy" Type="String" />
            <asp:Parameter Name="ContactPerson2" Type="String" />
            <asp:Parameter Name="Fax2" Type="String" />
            <asp:Parameter Name="Original_Client" Type="String" />
            <asp:Parameter Name="UpdateIP" Type="String" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="Client" Type="String" />
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="ChineseName" Type="String" />
            <asp:Parameter Name="Address" Type="String" />
            <asp:Parameter Name="ContactPerson" Type="String" />
            <asp:Parameter Name="JobTitle" Type="String" />
            <asp:Parameter Name="Phone" Type="String" />
            <asp:Parameter Name="Fax" Type="String" />
            <asp:Parameter Name="Phone2" Type="String" />
            <asp:Parameter Name="MobilePhone" Type="String" />
            <asp:Parameter Name="MobilePhone2" Type="String" />
            <asp:Parameter Name="WebSite" Type="String" />
            <asp:Parameter Name="EmailAddress" Type="String" />
            <asp:Parameter Name="EmailAddress2" Type="String" />
            <asp:Parameter Name="CreateBy" Type="String" />
            <asp:Parameter Name="UpdateBy" Type="String" />
            <asp:Parameter Name="OwnerGroupID" Type="String" />
            <asp:Parameter Name="ContactPerson2" Type="String" />
            <asp:Parameter Name="Fax2" Type="String" />
            <asp:Parameter Name="CreateIP" Type="String" />
        </InsertParameters>
    </asp:ObjectDataSource>
    <asp:Panel ID="SearchPanel" runat="server" HorizontalAlign="Center" Width="970px"
        Visible="false">
        <fieldset style="vertical-align: middle">
            <br />
            <table>
                <tr>
                    <td style="vertical-align: middle; text-align: right">
                        <asp:Label ID="lblSearchClientS" runat="server" Text="Client:" meta:resourcekey="lblClientResource1"></asp:Label>
                    </td>
                    <td style="vertical-align: middle; text-align: left; width: 281px;">
                        <asp:TextBox ID="txtSearchClient" runat="server"></asp:TextBox>
                        <asp:Button ID="btnSearch" runat="server" Text="Search" CausesValidation="false"
                            meta:resourcekey="btnSearch" OnClick="btnSearch_Click" />
                    </td>
                    <td style="vertical-align: middle; text-align: right">
                        <asp:Label ID="lblSearchChineseName" runat="server" Text="Chinese Name:" meta:resourcekey="lblChiNameResource1"></asp:Label>
                    </td>
                    <td style="vertical-align: middle; text-align: left">
                        <asp:TextBox ID="txtSearchChineseName" runat="server" Width="272px"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td style="vertical-align: middle; text-align: right">
                        <asp:Label ID="lblSearchName" runat="server" Text="Name:" meta:resourcekey="lblNameResource1"></asp:Label>
                    </td>
                    <td style="vertical-align: middle; text-align: left; width: 281px;">
                        <asp:TextBox ID="txtSearchName" runat="server" Width="272px"></asp:TextBox>
                    </td>
                    <td style="vertical-align: middle; text-align: right">
                        <asp:Label ID="lblSearchContactPerson" runat="server" Text="Contact Person:" meta:resourcekey="lblContactPersonResource1"></asp:Label>
                    </td>
                    <td style="vertical-align: middle; text-align: left">
                        <asp:TextBox ID="txtSearchContactPerson" runat="server" Width="272px"></asp:TextBox>
                    </td>
                </tr>
            </table>
        </fieldset>
    </asp:Panel>
    <table style="display: none; width: 970px;">
        <tr>
            <td align="center">
                <asp:Label ID="lblError" runat="server" ForeColor="Red" Width="100%" CssClass="error"
                    meta:resourcekey="lblErrorResource1"></asp:Label>
            </td>
        </tr>
    </table>
    <asp:Panel ID="GridPanel" runat="server" Height="300px" Width="970px" BorderWidth="1px"
        Visible="false" meta:resourcekey="GridPanelResource1">
        <asp:GridView CssClass="Grid" ID="GridView1" runat="server" DataSourceID="ODSClient"
            AutoGenerateColumns="False" Width="970px" BackColor="#DEBA84" BorderColor="#DEBA84"
            BorderStyle="None" BorderWidth="1px" CellPadding="3" CellSpacing="2" DataKeyNames="Client,Name,ChineseName,Address,ContactPerson,JobTitle,Phone,Fax,Phone2,MobilePhone,MobilePhone2,WebSite,EmailAddress,EmailAddress2"
            EmptyDataText="No Client record(s) available." OnSelectedIndexChanged="GridView1_SelectedIndexChanged"
            meta:resourcekey="GridView1Resource1" OnPageIndexChanging="GridView1_PageIndexChanging">
            <FooterStyle CssClass="GridFooterStyle" BackColor="#F7DFB5" ForeColor="#8C4510" />
            <Columns>
                <asp:ButtonField CommandName="Select" DataTextField="Client" HeaderText="Client"
                    meta:resourcekey="ButtonFieldResource1">
                    <ItemStyle Width="100px" Wrap="False" />
                </asp:ButtonField>
                <asp:BoundField DataField="Client" HeaderText="Client" ReadOnly="True" SortExpression="Client"
                    Visible="False" meta:resourcekey="BoundFieldResource1">
                    <ItemStyle Width="100px" Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" meta:resourcekey="BoundFieldResource2">
                    <ItemStyle Width="120px" Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="ChineseName" HeaderText="Chinese Name" SortExpression="ChineseName"
                    meta:resourcekey="BoundFieldResource3">
                    <ItemStyle Width="120px" Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="Address" HeaderText="Address" SortExpression="Address"
                    meta:resourcekey="BoundFieldResource4">
                    <ItemStyle Width="250px" />
                </asp:BoundField>
                <asp:BoundField DataField="ContactPerson" HeaderText="Contact Person" SortExpression="ContactPerson"
                    meta:resourcekey="BoundFieldResource5">
                    <ItemStyle Width="120px" Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="JobTitle" HeaderText="JobTitle" SortExpression="JobTitle"
                    meta:resourcekey="BoundFieldResource6">
                    <ItemStyle Width="100px" Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="Phone" HeaderText="Phone" SortExpression="Phone" meta:resourcekey="BoundFieldResource7">
                    <ItemStyle Width="80px" Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="Fax" HeaderText="Fax" SortExpression="Fax" meta:resourcekey="BoundFieldResource8">
                    <ItemStyle Width="80px" Wrap="False" />
                </asp:BoundField>
                <asp:BoundField DataField="CreateBy" HeaderText="CreateBy" SortExpression="CreateBy"
                    Visible="False" meta:resourcekey="BoundFieldResource9" />
                <asp:BoundField DataField="CreateDate" HeaderText="CreateDate" SortExpression="CreateDate"
                    Visible="False" meta:resourcekey="BoundFieldResource10" DataFormatString="{0:d}" />
                <asp:BoundField DataField="UpdateBy" HeaderText="UpdateBy" SortExpression="UpdateBy"
                    Visible="False" meta:resourcekey="BoundFieldResource11" />
                <asp:BoundField DataField="UpdateDate" HeaderText="UpdateDate" SortExpression="UpdateDate"
                    Visible="False" meta:resourcekey="BoundFieldResource12" DataFormatString="{0:d}" />
                <asp:BoundField DataField="OwnerGroupID" HeaderText="OwnerGroupID" SortExpression="OwnerGroupID"
                    Visible="False" meta:resourcekey="BoundFieldResource13" />
                <asp:BoundField DataField="Phone2" HeaderText="Phone2" SortExpression="Phone2" Visible="False"
                    meta:resourcekey="BoundFieldResource14" />
                <asp:BoundField DataField="MobilePhone" HeaderText="MobilePhone" SortExpression="MobilePhone"
                    Visible="False" meta:resourcekey="BoundFieldResource15" />
                <asp:BoundField DataField="MobilePhone2" HeaderText="MobilePhone2" SortExpression="MobilePhone2"
                    Visible="False" meta:resourcekey="BoundFieldResource16" />
                <asp:BoundField DataField="WebSite" HeaderText="WebSite" SortExpression="WebSite"
                    Visible="False" meta:resourcekey="BoundFieldResource17" />
                <asp:BoundField DataField="EmailAddress" HeaderText="EmailAddress" SortExpression="EmailAddress"
                    Visible="False" meta:resourcekey="BoundFieldResource18" />
                <asp:BoundField DataField="EmailAddress2" HeaderText="EmailAddress2" SortExpression="EmailAddress2"
                    Visible="False" meta:resourcekey="BoundFieldResource19" />
            </Columns>
            <RowStyle CssClass="GridRowStyle" BackColor="#FFF7E7" ForeColor="#8C4510" />
            <SelectedRowStyle CssClass="GridSelectedRowStyle" BackColor="#738A9C" Font-Bold="False"
                ForeColor="White" />
            <PagerStyle CssClass="GridPagerStyle" ForeColor="#8C4510" HorizontalAlign="Center" />
            <HeaderStyle CssClass="GridHeaderStyle" BackColor="DarkBlue" Font-Bold="True" ForeColor="White" />
        </asp:GridView>
    </asp:Panel>
    <div style="padding-top: 10px; width: 970px">
        <div style="padding: 5px">
            <fieldset style="text-align: center">
                <legend>
                    <asp:Label ID="lblClientAdd" runat="server" Text="Edit Client" meta:resourcekey="lblRoleResource1"></asp:Label></legend>
                <table>
                    <tr>
                        <td style="vertical-align: top; text-align: right; width: 115px;">
                            <asp:Label ID="lblClient" runat="server" Text="Client" meta:resourcekey="lblClientResource1"></asp:Label>
                        </td>
                        <td style="vertical-align: top; text-align: left; width: 157px;" colspan="2">
                            <asp:TextBox ID="txtClient" runat="server" CssClass="required" ReadOnly="True" meta:resourcekey="txtClientResource1"
                                MaxLength="30"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtClient"
                                Display="Dynamic" ErrorMessage="Client is a required field." meta:resourcekey="RequiredFieldValidator1Resource1"></asp:RequiredFieldValidator>
                        </td>
                        <td style="vertical-align: top; width: 157px; text-align: left">
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top; text-align: right; width: 115px;">
                            <asp:Label ID="lblName" runat="server" Text="Name" meta:resourcekey="lblNameResource1"></asp:Label>
                        </td>
                        <td style="vertical-align: top; width: 157px; text-align: left;">
                            <asp:TextBox ID="txtName" runat="server" Width="244px" ReadOnly="True" meta:resourcekey="txtNameResource1"
                                MaxLength="100"></asp:TextBox>
                        </td>
                        <td style="vertical-align: top; width: 115px; text-align: right;">
                            <asp:Label ID="lblChiName" runat="server" Text="Chinese Name" meta:resourcekey="lblChiNameResource1"></asp:Label>
                        </td>
                        <td style="vertical-align: top; width: 157px; text-align: left;">
                            <asp:TextBox ID="txtChiName" runat="server" Width="244px" ReadOnly="True" meta:resourcekey="txtChiNameResource1"
                                MaxLength="100"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top; width: 115px; text-align: right">
                            <asp:Label ID="lblAddress" runat="server" Text="Address" meta:resourcekey="lblAddressResource1"></asp:Label>
                        </td>
                        <td colspan="3" style="vertical-align: top; width: 157px; text-align: left">
                            <asp:TextBox ID="txtAddress" runat="server" MaxLength="100" TextMode="MultiLine"
                                Width="363px" ReadOnly="True" meta:resourcekey="txtAddressResource1"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top; width: 115px; text-align: right">
                            <asp:Label ID="lblWebSite" runat="server" Text="WebSite" meta:resourcekey="lblWebSiteResource1"></asp:Label>
                        </td>
                        <td style="vertical-align: top; width: 157px; text-align: left">
                            <asp:TextBox ID="txtWebSite" runat="server" Width="244px" ReadOnly="True" meta:resourcekey="txtWebSiteResource1"
                                MaxLength="100"></asp:TextBox>
                        </td>
                        <td style="vertical-align: top; width: 115px; text-align: right">
                            <asp:Label ID="lblJobTitle" runat="server" Text="Job Title" meta:resourcekey="lblJobTitleResource1"></asp:Label>
                        </td>
                        <td style="vertical-align: top; width: 157px; text-align: left">
                            <asp:TextBox ID="txtJobTitle" runat="server" Width="244px" ReadOnly="True" meta:resourcekey="txtJobTitleResource1"
                                MaxLength="60"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top; width: 115px; text-align: right">
                            <asp:Label ID="lblContactPerson" runat="server" Text="Contact Person" meta:resourcekey="lblContactPersonResource1"></asp:Label>
                        </td>
                        <td style="vertical-align: top; width: 157px; text-align: left">
                            <asp:TextBox ID="txtContactPerson" runat="server" Width="244px" ReadOnly="True" meta:resourcekey="txtContactPersonResource1"
                                MaxLength="30"></asp:TextBox>
                        </td>
                        <td style="vertical-align: top; width: 115px; text-align: right">
                            &nbsp;<asp:Label ID="lblContactPerson2" runat="server" Text="Contact Person 2" meta:resourcekey="lblContactPerson2"></asp:Label>
                        </td>
                        <td style="vertical-align: top; width: 157px; text-align: left">
                            <asp:TextBox ID="txtContactPerson2" runat="server" Width="213px" ReadOnly="True"
                                meta:resourcekey="txtMobilePhoneResource1" MaxLength="30"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top; width: 115px; text-align: right">
                            <asp:Label ID="lblPhone" runat="server" Text="Phone" meta:resourcekey="lblPhoneResource1"></asp:Label>
                        </td>
                        <td style="vertical-align: top; width: 157px; text-align: left">
                            <asp:TextBox ID="txtPhone" runat="server" Width="213px" ReadOnly="True" meta:resourcekey="txtPhoneResource1"
                                MaxLength="30"></asp:TextBox>
                        </td>
                        <td style="vertical-align: top; width: 115px; text-align: right">
                            <asp:Label ID="lblPhone2" runat="server" Text="Phone 2" meta:resourcekey="lblPhone2Resource1"></asp:Label>
                        </td>
                        <td style="vertical-align: top; width: 157px; text-align: left">
                            <asp:TextBox ID="txtPhone2" runat="server" Width="213px" ReadOnly="True" meta:resourcekey="txtPhone2Resource1"
                                MaxLength="30"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top; width: 115px; text-align: right">
                            <asp:Label ID="lblFax" runat="server" Text="Fax Number" meta:resourcekey="lblFaxResource1"></asp:Label>
                        </td>
                        <td style="vertical-align: top; width: 157px; text-align: left">
                            <asp:TextBox ID="txtFax" runat="server" Width="213px" ReadOnly="True" meta:resourcekey="txtFaxResource1"
                                MaxLength="30"></asp:TextBox>
                        </td>
                        <td style="vertical-align: top; width: 115px; text-align: right">
                            <asp:Label ID="lblFax2" runat="server" Text="Fax Number 2" meta:resourcekey="lblFax2"></asp:Label>
                        </td>
                        <td style="vertical-align: top; width: 157px; text-align: left">
                            <asp:TextBox ID="txtFax2" runat="server" Width="213px" ReadOnly="True" meta:resourcekey="txtMobilePhone2Resource1"
                                MaxLength="30"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td style="vertical-align: top; width: 115px; text-align: right">
                            <asp:Label ID="lblEmailAddress" runat="server" Text="Email" meta:resourcekey="lblEmailAddressResource1"></asp:Label>
                        </td>
                        <td style="vertical-align: top; width: 157px; text-align: left">
                            <asp:TextBox ID="txtEmailAddress" runat="server" Width="213px" ReadOnly="True" meta:resourcekey="txtEmailAddressResource1"
                                MaxLength="30"></asp:TextBox>
                        </td>
                        <td style="vertical-align: top; width: 115px; text-align: right">
                            <asp:Label ID="lblEmailAddress2" runat="server" Text="Email 2" meta:resourcekey="lblEmailAddress2Resource1"></asp:Label>
                        </td>
                        <td style="vertical-align: top; width: 157px; text-align: left">
                            <asp:TextBox ID="txtEmailAddress2" runat="server" Width="213px" ReadOnly="True" meta:resourcekey="txtEmailAddress2Resource1"
                                MaxLength="30"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" style="width: 100%; text-align: center">
                            <asp:Button ID="btnNew" runat="server" CssClass="submit" Text="New" OnClick="btnNew_Click"
                                Visible="false" CausesValidation="False" meta:resourcekey="btnNewResource1" />
                            <asp:Button ID="btnModify" runat="server" CssClass="submit" Text="Edit" OnClick="btnModify_Click"
                                Visible="false" CausesValidation="False" meta:resourcekey="btnModifyResource1" />
                            <asp:Button ID="btnSave" runat="server" CssClass="submit" Text="Save" OnClick="btnSave_Click"
                                meta:resourcekey="btnSaveResource1" />
                            <asp:Button ID="btnDelete" runat="server" CausesValidation="False" CssClass="submit"
                                OnClick="btnDelete_Click" Text="Delete" meta:resourcekey="btnDeleteResource1" />
                            <asp:Button ID="btnRestore" runat="server" Text="Restore" meta:resourcekey='btnRestore'
                                OnClick="btnRestore_Click" CssClass="submit" CausesValidation="False" />
                            <asp:Button ID="btnCancel" runat="server" CssClass="reset" Text="Cancel" OnClick="btnCancel_Click"
                                CausesValidation="False" Visible="false" meta:resourcekey="btnCancelResource1" />
                            <asp:Button ID="btnBack" runat="server" CausesValidation="false" CssClass="reset"
                                meta:resourcekey="btnBackResource1" Text="Back" OnClick="btnBack_Click" />
                        </td>
                    </tr>
                </table>
                <asp:CheckBox ID="chkForOperation" runat="server" Visible="False" meta:resourcekey="chkForOperationResource1" />
                <asp:CheckBox ID="cbForUpdate" runat="server" Height="2px" Visible="False" Width="121px"
                    meta:resourcekey="cbForUpdateResource1" /></fieldset>
        </div>
    </div>
    <table height="100">
        <tr>
            <td>
            </td>
        </tr>
    </table>
</asp:Content>
